package com.example.storage;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Transactional 是你使用事务的“操作指令”
 * @EnableTransactionManagement 是你启动事务管理机制的“电源开关”
 */
@EnableTransactionManagement // 启用 Spring 的事务管理功能（基于 AOP）
@MapperScan("com.example.storage.mapper")
@EnableDiscoveryClient
@SpringBootApplication
public class SeataStorageMainApplication {

    public static void main(String[] args) {
        SpringApplication.run(SeataStorageMainApplication.class, args);
    }

}
